package com.tianji.learning.service;

import com.tianji.learning.entity.po.PointsBoard;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.learning.entity.query.PointsBoardQuery;
import com.tianji.learning.entity.vo.PointsBoardVO;

import java.util.List;

/**
 * <p>
 * 学霸天梯榜 服务类
 * </p>
 *
 * @author lemon
 */
public interface IPointsBoardService extends IService<PointsBoard> {

    /**
     * 查询学霸天梯榜
     *
     * @param query
     * @return
     */
    PointsBoardVO queryPointsBoard(PointsBoardQuery query);

    /**
     * 创建表  points_board_sessionId
     *
     * @param seasonId
     */
    void createPointsBoardTableBySeason(Integer seasonId);

    /**
     * 将redis中的数据存入数据库
     *
     * @param pointsBoardList
     */
    void savePointsBoard2DB(List<PointsBoard> pointsBoardList);

    /**
     * 分页查询赛季列表 当前赛季
     *
     * @param key
     * @param pageNo
     * @param pageSize
     * @return
     */
    List<PointsBoard> queryCurrentSeason(String key, Integer pageNo, Integer pageSize);
}
